package com.sky.mapper;

import com.sky.entity.Orders;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;
import java.util.List;
@Mapper
public interface OrdersMapper {
    void insert(Orders orders);

    @Select("select * from orders where status = #{status} and order_time = #{order_time}")
    List<Orders> getByStatusAndOrdertimeLT(Integer status, LocalDateTime ordertime);

    void update(Orders order);
    @Select("select * from orders where number = #{outTradeNo} and user_id= #{userId}")
    Orders getByNumberAndUserId(String outTradeNo, Long userId);
}
